package com.situ.day12lianxi4;

public class AccountAdmin {
	private Double balance;
	
	
	
	public AccountAdmin() {
		this.balance = 0.0;
	}

	public void cunQian(double amount) {
		balance += amount;
	}
	
	public void quQian(double amount) throws MeiQianException {
		if (amount <= balance) {
			balance -= amount;
		}else {
			double need = amount - balance;
			throw new MeiQianException(need);
		}
	}

	public Double getBalance() {
		return balance;
	}

	public void setBalance(Double balance) {
		this.balance = balance;
	}
	

}
